package com.smartleanx.module.hrm.dal.mysql.examine.examineResult;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineResult.ExamineResultDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineResult.vo.*;

/**
 * 考核结果模版 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineResultMapper extends BaseMapperX<ExamineResultDO> {

    default PageResult<ExamineResultDO> selectPage(ExamineResultPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineResultDO>()
                .eqIfPresent(ExamineResultDO::getResultType, reqVO.getResultType())
                .eqIfPresent(ExamineResultDO::getResultEmployeeId, reqVO.getResultEmployeeId())
                .eqIfPresent(ExamineResultDO::getExamineId, reqVO.getExamineId())
                .orderByDesc(ExamineResultDO::getId));
    }

}